#ifndef __IBT_VIDEO_H__
#define __IBT_VIDEO_H__

#if 0
#include <imp/imp_common.h>
#include <imp/imp_encoder.h>
#endif

#include "IBT_Common.h"

/*#define SNAP_OPEN*/

typedef enum{
	JV_PT_H264 = 0,
	JV_PT_H265 = 1,
	JV_PT_JPEG = 2,
	JV_PT_MJPEG = 3,
	JV_PT_MAX
}jz_payload_type_e;

typedef struct
{
	unsigned int	width;		///< resolution width
	unsigned int	height;		///< resolution height
	unsigned int	framerate;	///< framerate such as 25, 30 ...
	unsigned int	nGOP;		///< interval between two key frame
#if 0
	IMPEncoderRcMode rcMode;
#endif
	unsigned int	  bitrate;		///< KBit per second
	jz_payload_type_e vencType;		// 视频编码协议类型
}IBT_STREAM_ATTR;

struct IBTVideoHandler {
	IBTHandler  *ibtHandler;
	IBTEventCallback event;
	pthread_t encTid[HWINFO_STREAM_CNT];
	pthread_t ivsTid;
	pthread_t osdTid[HWINFO_STREAM_CNT];
	pthread_t framTid[HWINFO_STREAM_CNT];
	IBT_STREAM_ATTR ibtStreamAttr[HWINFO_STREAM_CNT];
	IBT_PTR		priv[0];
};

IBTVideoHandler *IBT_Video_Init(IBTHandler *ibtHandler);
IBT_VOID IBT_Video_DeInit(IBTVideoHandler *h);

#endif
